<?php

define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');

$act = $_REQUEST['act'];
//判断登录
$user_id = check_user_login();

//检查卡信息
if ($act == 'check_status') {
    $info = array();
    $card_num = $_REQUEST['card_num'];
    $param = array(
        'CARDNUM' => $card_num,
        'VERSION' => '-4',
        'QUERYMBR' => 0,
    );
    $res = $card->exec('CHECKCARDEX_NOPROFILE', $param);
    switch (intval($res['sOutParams']['Def']['Result'])) {
        case 0:
            $res['sOutParams']['Def']['Result'] = "正常";
            break;
        case 1:
            $res['sOutParams']['Def']['Result'] = $res['sOutParams']['Def']['Msg'];
            break;
    }
    make_json_result($res['sOutParams']);
}
